package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.uppermenu.equipment;

import com.gwtext.client.widgets.menu.Item;
import com.gwtext.client.widgets.menu.Menu;
import com.gwtext.client.widgets.menu.MenuItem;

/**
 * @author Renato Miceli
 */
public class AddEquipmentItem extends MenuItem {

	private static class ComponentsItem extends MenuItem {

		public ComponentsItem() {

			this.setText("Components");

			final Menu componentsMenu = new Menu();
			componentsMenu.setShadow(true);
			componentsMenu.setMinWidth(10);
			this.setMenu(componentsMenu);

			Item processor = new Item("Processor");
			componentsMenu.addItem(processor);

			Item memory = new Item("Memory");
			componentsMenu.addItem(memory);

			Item hardDisk = new Item("Hard Disk");
			componentsMenu.addItem(hardDisk);

			Item videoCard = new Item("Video Card");
			componentsMenu.addItem(videoCard);

			Item display = new Item("Display");
			componentsMenu.addItem(display);

			Item keyboard = new Item("Keyboard");
			componentsMenu.addItem(keyboard);

			Item mouse = new Item("Mouse");
			componentsMenu.addItem(mouse);

			Item powerSource = new Item("Power Source");
			componentsMenu.addItem(powerSource);
		}
	}

	public AddEquipmentItem() {

		this.setText("Add Equipment");
		final Menu addEquipmentMenu = new Menu();
		addEquipmentMenu.setShadow(true);
		addEquipmentMenu.setMinWidth(10);
		this.setMenu(addEquipmentMenu);

		Item computerItem = new Item("Computer");
		addEquipmentMenu.addItem(computerItem);

		addEquipmentMenu.addItem(new ComponentsItem());

		Item printerItem = new Item("Printer");
		addEquipmentMenu.addItem(printerItem);

		Item noBreakItem = new Item("No-Break");
		addEquipmentMenu.addItem(noBreakItem);

		Item routerItem = new Item("Router");
		addEquipmentMenu.addItem(routerItem);

		Item otherEquipsItem = new Item("Other Equipments");
		addEquipmentMenu.addItem(otherEquipsItem);
	}

}
